/*
 *  Copyright (C) void Team 2010 Pedro Batista
 * 
 *  http://code.google.com/p/capacitec
 * 
 *  This file is part of capacitec.
 * 
 *  capacitec is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  capacitec is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with capacitec.  If not, see <http://www.gnu.org/licenses/>.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author pedro
 */
@Embeddable
public class AlunoSubProgramaPK implements Serializable {
	@Basic(optional = false)
        @Column(name = "aluno_pessoa_id", nullable = false)
	private int alunoPessoaId;
	@Basic(optional = false)
        @Column(name = "subPrograma_id", nullable = false)
	private int subProgramaid;

	public AlunoSubProgramaPK() {
	}

	public AlunoSubProgramaPK(int alunoPessoaId, int subProgramaid) {
		this.alunoPessoaId = alunoPessoaId;
		this.subProgramaid = subProgramaid;
	}

	public int getAlunoPessoaId() {
		return alunoPessoaId;
	}

	public void setAlunoPessoaId(int alunoPessoaId) {
		this.alunoPessoaId = alunoPessoaId;
	}

	public int getSubProgramaid() {
		return subProgramaid;
	}

	public void setSubProgramaid(int subProgramaid) {
		this.subProgramaid = subProgramaid;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (int) alunoPessoaId;
		hash += (int) subProgramaid;
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are not set
		if (!(object instanceof AlunoSubProgramaPK)) {
			return false;
		}
		AlunoSubProgramaPK other = (AlunoSubProgramaPK) object;
		if (this.alunoPessoaId != other.alunoPessoaId) {
			return false;
		}
		if (this.subProgramaid != other.subProgramaid) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "entidades.AlunoSubProgramaPK[alunoPessoaId=" + alunoPessoaId + ", subProgramaid=" + subProgramaid + "]";
	}

}
